package com.ajmd.onlineexam.mapper;

import com.ajmd.onlineexam.entity.StudentPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author ajmd
 * @since 2023/3/8 11:34
 */

//BaseMapper是mybatis-plus提供的一个接口，包含了很多基础的数据库操作
public interface StudentMapper extends BaseMapper<StudentPO> {
    @Select("update u_student set credit = credit + #{credit} where account = #{account}")
    void addCredit(String account,int credit);
}
